﻿using System;
using System.IO;

namespace JsValidator
{
    class Program
    {
        static int Main(string[] args)
        {
            var configFile = "JsValidator.js";

            if (args.Length >= 1)
                configFile = args[0];

            try
            {
                new Processor(new Reporter(), configFile).Process();

                return 0;
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.Message);
                return 0;
            }
        }

    }
}
